package wangyihuyu;

import java.util.Arrays;
import java.util.Scanner;

/**
 * Created by JiaJia on 2019/9/7 0007.
 */
public class CoffeeDrink {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            int n=scanner.nextInt();
            for (int i = 0; i <n ; i++) {
                int blank=scanner.nextInt();
                int regularCount=scanner.nextInt();
                int[] day=new int[30];
                Arrays.fill(day,0);
                if (regularCount!=0){
                    while (regularCount>0){
                        day[scanner.nextInt()-1]=1;
                        regularCount--;
                    }
                    System.out.println(countDay(day,blank));
                }else {
                    System.out.println(countDay(day,blank));
                }
            }
        }scanner.close();
    }
    private static int countDay(int[] day,int blank){
        for (int i = 0; i <30 ; i++) {
            if (day[i]==1){
                continue;
            }
            boolean pre=true,next=true;
            int start,end;
            if (i<=blank){
                start=0;
            }else {
                start=i-blank;
            }
            if (i>=29-blank){
                end=29;
            }else {
                end=i+blank;
            }
            for (int j = start; j <i ; j++) {
                if (day[j]==1){
                    pre=false;
                    break;
                }
            }
            for (int j = end; j >i ; j--) {
                if (day[j]==1){
                    next=false;
                    break;
                }
            }
            if (pre&&next){
                day[i]=1;
            }
        }
        int count=0;
        for (int i = 0; i <=29 ; i++) {
            if (day[i]==1)
                count++;
        }
        return count;
    }
}